package cn.edu.scau.sec.rw.model.pro_manage;

import cn.edu.scau.sec.rw.model.pro_manage.simulation.Clock;

import java.util.ArrayList;
import java.util.List;

/**
 *进程
 */
public class Process {


   private PCB pcb = PCB.getPCB();
   private Clock clock = new Clock();
   private String deviceName;
   private Integer deviceTime;

   private static List<Process> initProcesses = new ArrayList<Process>();  //空白队列
   private static List<Process> readyProcesses = new ArrayList<Process>(); //就绪队列
   private static List<Process> blockProcesses = new ArrayList<Process>(); //阻塞队列
   private static List<Process> IOWaitProcesses = new ArrayList<Process>(); //IO等待队列
   //private static List<Process> IOExecuteProcesses = new ArrayList<Process>(); //IO执行队列
   private static List<Process> IOFinishProcesses = new ArrayList<Process>(); //IO完成队列




   public Process() {};

    public PCB getPCB() {
        return pcb;
    }

    public void setPCB(PCB pcb) {
        this.pcb = pcb;
    }

    public Clock getClock() {
        return clock;
    }

    public void setClock(Clock clock) {
        this.clock = clock;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public Integer getDeviceTime() {
        return deviceTime;
    }

    public void setDeviceTime(Integer deviceTime) {
        this.deviceTime = deviceTime;
    }

    public static List<Process> getInitProcesses() {
        return initProcesses;
    }

    public static void setInitProcesses(List<Process> initProcesses) {
        Process.initProcesses = initProcesses;
    }

    public static List<Process> getReadyProcesses() {
        return readyProcesses;
    }

    public static void setReadyProcesses(List<Process> readyProcesses) {
        Process.readyProcesses = readyProcesses;
    }

    public static List<Process> getBlockProcesses() {
        return blockProcesses;
    }

    public static void setBlockProcesses(List<Process> blockProcesses) {
        Process.blockProcesses = blockProcesses;
    }

    public static List<Process> getIOWaitProcesses() {
        return IOWaitProcesses;
    }

    public static void setIOWaitProcesses(List<Process> IOWaitProcesses) {
        Process.IOWaitProcesses = IOWaitProcesses;
    }

    public static List<Process> getIOFinishProcesses() {
        return IOFinishProcesses;
    }

    public static void setIOFinishProcesses(List<Process> IOFinishProcesses) {
        Process.IOFinishProcesses = IOFinishProcesses;
    }
}
